package com.nulldev.util.web.URLUtils.internal;

import java.io.IOException;
import java.net.Proxy;
import java.net.URL;

public class HTTPSHandlerExposed extends sun.net.www.protocol.http.Handler {
	protected String proxy;
	protected int proxyPort;

	protected int getDefaultPort() {
		return 443;
	}

	public HTTPSHandlerExposed() {
		proxy = null;
		proxyPort = -1;
	}

	public HTTPSHandlerExposed(String proxy, int port) {
		this.proxy = proxy;
		this.proxyPort = port;
	}

	protected java.net.URLConnection openConnection(URL u) throws IOException {
		return openConnection(u, (Proxy) null);
	}

	protected java.net.URLConnection openConnection(URL u, Proxy p) throws IOException {
		return new HTTPSUrlConnectionImpl(u, p, this);
	}
}